gtk-demo: Avoid a segfault
authorMatthias Clasen <mclasen@redhat.com>
Fri, 9 Sep 2022 16:33:08 +0000 (12:33 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 9 Sep 2022 16:34:54 +0000 (12:34 -0400)
commit54daad387853a125c9614545718f1abce26050bc
tree3951179442cb4f81f439798c7a9379115604f576
parentd7817e6fc620799af5ab6b496f0cdf58c7616fe2
gtk-demo: Avoid a segfault

The code in the fontrendering demo is a bit sloppy
and assumes that we always get a single run when
appending a sequence of 4 chars and 4 spaces.

That is not in general true, such as for Emoji.

Instead of working harder to handle Emoji here,
just give up and fall back to 'a'.

Fixes: #5166
demos/gtk-demo/fontrendering.c